<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    // function fn(obj){
    //     console.log("你好，我叫"+ obj.name +"，今年"+ obj.age +"岁，来自于" + obj.city);
    // }

    // fn({
    //     city:"北京",
    //     age:18,
    //     name:"张三"
    // });


    var obj = {
        name:"admin",
        age:19,
        abc:"hahah",
        qwe:"heiheihei",
        asd:"hello"
    }

    var age = "asd";

    console.log( obj.age );
    console.log( obj["age"] );
    console.log( obj[age] );

    obj.sex = "男";
    
    obj.sex = "女";

    obj.name = "张三";

    delete obj.name;
    delete obj.abc;
    delete obj.asd;
    delete obj.qwe;

    console.log(obj);

</script>
</html>